package com.slx.second_minimum_node_in_a_binary_tree;

import org.junit.Assert;

public class SolutionTest {

    @org.junit.Test
    public void findSecondMinimumValue() {
        Solution s = new Solution();

        TreeNode root = new TreeNode(2);
        root.left = new TreeNode(2);
        root.right = new TreeNode(5);
        root.right.left = new TreeNode(5);
        root.right.right = new TreeNode(7);

        Assert.assertEquals(5, s.findSecondMinimumValue(root));
    }
}